# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=bruteforce-wallet
pkgver=43.648d7d7
pkgrel=1
pkgdesc='Try to find the password of an encrypted Peercoin (or Bitcoin,Litecoin, etc...) wallet file.'
groups=('blackarch' 'blackarch-cracker' 'blackarch-crypto')
arch=('x86_64' 'aarch64')
url='https://github.com/glv2/bruteforce-wallet'
license=('GPL3')
depends=('openssl' 'db5.3')
makedepends=('git')
source=("git+https://github.com/glv2/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  ./autogen.sh

  ./configure --prefix=/usr

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md NEWS AUTHORS \
    README
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

